package com.ayoka.parenting.ui.meditation.question;

import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentManager;

import com.ayoka.parenting.bean.BaseResponse;
import com.ayoka.parenting.bean.MeditationQuestionBean;
import com.ayoka.parenting.bean.ResponseMeditationQuestion;
import com.ayoka.parenting.interf.RequestCallback;
import com.ayoka.parenting.mvp.BasePresenter;
import com.ayoka.parenting.mvp.BaseView;

import java.util.List;

/**
 * @ProjectName: MVPPlugin.
 * @ClassName: MeditationQuestionContract.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/10/10 18:17.
 */
public class MeditationQuestionContract {

    interface View extends BaseView {
        void configMeditationQuestionData(ResponseMeditationQuestion data);

        void onSaveQuestionAnswerCallback(boolean isSuccess);

        void onSynchronizedCircleGroupCallback(boolean isSuccess);

        void onDialogDismiss(DialogFragment dialog);
    }

    interface Presenter extends BasePresenter<View> {
        void getMeditationQuestionData(String recordId);

        void saveQuestionAnswer(String recordId, ResponseMeditationQuestion questionBean);

        void showSynchronizedCircleGroupDialog(FragmentManager fragmentManager, ResponseMeditationQuestion questionBean);

        void showMeditationCompletedDialog(FragmentManager fragmentManager, int dayNumber);
    }

    interface Model {
        void getMeditationQuestionPresenter(BasePresenter presenter, String recordId, RequestCallback<ResponseMeditationQuestion> callback);

        void saveQuestionAnswer(BasePresenter presenter, String recordId, List<MeditationQuestionBean.AnswerResultBean> answerResult, RequestCallback<BaseResponse> callback);

        void synchronizedCircleGroup(BasePresenter presenter, String content, RequestCallback<BaseResponse> callback);
    }
}
